﻿/**
 * @author sminutoli
 * version 1.0
 * 
 * 
 * 
 */
import com.dinmax.flash.utilities.movieclip.MovieClipUtils
import com.dinmax.flash.utilities.date.DateUtils
import com.dinmax.flash.draw.cabeza.ScrollCabeza

class com.dinmax.flash.central.bridge.WINDOWMessageBridge
extends com.dinmax.flash.draw.cabeza.WindowCabeza {

	private static var LINK_ID:String = "MessageItem";
	
	public function drawItem(time:Date, from:String, subject:String, state:String):MovieClip {
		//trace(" WINDOWMessageBridge.as | drawItem() ");
		var clip:MovieClip = super.drawItem(WINDOWMessageBridge.LINK_ID);
		clip.setDate(DateUtils.dateToString(time, DateUtils.date_DD_MM_AA, "-"));
		clip.setFrom(from);
		clip.setSubject(subject);
		clip.setState(state);
		this.getScrollV().setStep(clip._height);
		
		return clip;
	};
	
	private function initScrollV():Void {
		super.initScrollV();
		this.getScrollV().setMouseWheel(true, this);
	};		
	
};